function Obstacles()
{
	this.NUMBER_OF_ROWS = 14;
	this.Rows = new Array(this.NUMBER_OF_ROWS);
	this.boundsLowerY = 0;
}

Obstacles.prototype =
{
	initialize: function() {
		var r = -2;
		for (var i = 0; i < this.NUMBER_OF_ROWS; i++)
		{
			this.Rows[i] = new ObstacleRow();
			this.Rows[i].Y = r * 8;
			this.Rows[i].clear();
			this.Rows[i].boundsLowerY = this.boundsLowerY;
			this.Rows[i].Row = r;
			r++;
		}

		for (var i = 0; i < this.NUMBER_OF_ROWS; i++)
		{
			this.Rows[i].populate();
		}
		//this.Rows[0].populate();
		//this.Rows[1].populate();
	},

	update: function(posY) {
		for (var i = 0; i < this.NUMBER_OF_ROWS; i++)
		{
			this.Rows[i].updatePosition(posY);
		}
	},

	draw: function() {
		for (var i = 0; i < this.NUMBER_OF_ROWS; i++)
		{
			this.Rows[i].draw();
		}
	}

};
